With the development of the size of the internet, more and different network structures have been appearing. So processing packets by a network device in a network is necessary when a host computer in the network visits another network. For example, before forwarding a packet in a first network to a second network, forward-related information is necessary to package the packet, to obtain a packaged packet which contains forward-related information, then the packaged packet is forwarded to the second network. When the second network receives and forwards the packaged packet, the packaged packet is processed with filtering, routing, firewall testing, tracking and so on.